package com.fmdrama.test;

import org.apache.commons.httpclient.HttpClient;
import org.apache.commons.httpclient.methods.PostMethod;

public class GetPlayUrl {
	
	public static void main(String[] args) {
		for(int i=0; i<100; i++){
			
		
//		String COOKIE = "Hm_lpt_640e8b7496ca5e87eb42eaddcd6e82ba=948B174CD7A8A467AA1976C710ACF3ED; Path=/Hm_lt_640e8b7496ca5e87eb42eaddcd6e82ba=20140120104346; CNZZDATA770950=cnzz_eid%3D470312280-1390185653-%26ntime%3D1390202898%26cnzz_a%3D39%26ltime%3D1390185653660; CNZZDATA30052621=cnzz_eid%3D1286133588-1390185653-%26ntime%3D1390202898%26cnzz_a%3D19%26ltime%3D1390185658260; Hm_lvt_640e8b7496ca5e87eb42eaddcd6e82ba=1390185661; Hm_lpvt_640e8b7496ca5e87eb42eaddcd6e82ba=1390202899";
		String COOKIE = "CNZZDATA770950=cnzz_eid%3D1325967015-1390216427-%26ntime%3D1390221892%26cnzz_a%3D43%26ltime%3D1390216427825; CNZZDATA30052621=cnzz_eid%3D97441894-1390216427-%26ntime%3D1390221892%26cnzz_a%3D21%26ltime%3D1390216428394; Hm_lvt_640e8b7496ca5e87eb42eaddcd6e82ba=1390223275,1390223323,1390224146,1390224173; off=http%3A%2F%2Ft.cn%2FzRSY0Cx; JSESSIONID=C5BB62AAB8CF6C4E7AA182E205DB1415; Hm_lt_640e8b7496ca5e87eb42eaddcd6e82ba=20140120212505; Hm_lpt_640e8b7496ca5e87eb42eaddcd6e82ba=948B174CD7A8A467AA1976C710ACF3ED; Hm_lpvt_640e8b7496ca5e87eb42eaddcd6e82ba=1390224173";
		HttpClient client = new HttpClient();
		PostMethod postMethod = null;
		try{
			postMethod = new PostMethod("http://www.koreayh.com/player/playurl");
			postMethod.addParameter("film", "1402");
			postMethod.addParameter("film_", "1");
			postMethod.addParameter("type", "youku");
			postMethod.addParameter("film_code", "95E1C8762F1B4FD59813AB2BEF7F16FE");
			postMethod.addRequestHeader("Cookie", COOKIE);
			
			client.executeMethod(postMethod);
			String result = postMethod.getResponseBodyAsString();
			System.out.println(result);
		}catch (Exception e) {
			e.printStackTrace();
		}finally{
			postMethod.releaseConnection();
		}
	}
	}
	
}
